<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>

const axios = require('axios');

export default {
  
  name : 'app',
  
  data () {
    return {
        
    }
  },

  props : {

  },

  components : {
    
  },

  computed : {

  },

  methods : {
    
  },

  watch : {
      
  },

  mounted () {
    
  },

  beforeCreate () {


    const r = sessionStorage.getItem('routers');

    let r1 = JSON.parse(r);

    r1.forEach(item => {
      item['component'] = () => import('@/views/test/table.vue')
    })

    this.$router.addRoutes([
        {
            path: '/',
            name: 'index',
            component: () => import('./views/index.vue'),
            children : r1,
        }
    ]);

  },

}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /*text-align: center;*/
  color: #2c3e50;
  /*margin-top: 60px;*/
}
#app, body, html {
  width: 100%;
  height: 100%;
}
</style>
